<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>typeof运算符</title>
</head>
<body>
<p id="demo"></p>
<p id="number"></p>
<p id="demo1"></p>
<script>
    document.getElementById("demo").innerHTML =
        typeof "" + "<br/>" +
        typeof "Bill" + "<br/>" +
        typeof "Breaking";
    document.getElementById("number").innerHTML =
        typeof 0 + "<br/>" +
        typeof 314 + "<br/>" +
        typeof 3.14 + "<br/>" +
        typeof (3) + "<br/>" +
        typeof (4+3);
    document.getElementById("demo1").innerHTML =
        typeof {name:'Bill', age:62} + "<br>" + //object
        typeof [1,2,3,4] + "<br>" + //object 在 JavaScript 中数组即对象
        typeof null + "<br>" + // object
        typeof function myFunc(){}; //function
</script>
</body>
</html>